import Main from "../views/Main";
import Login from "../views/Login";
import Detail from '../views/Detail'

import Home from "../views/Home";
import Set from "../views/Set";


export const MenuList = [
  {
    path: "/main/home",
    element: <Home />,
    title: "首页",
  },
  {
    path: "/main/set",
    element: <Set />,
    title: "账户设置",
  },
];

const routes = [
  {
    path: "/main",
    element: <Main />,
    children: [
      ...MenuList,
      {
        from: "/main",
        to: "/main/home",
      },
    ],
  },
  {
    path: "/login",
    element: <Login />,
  },
  {
    path: '/detail/:id',
    element: <Detail/>
  },
  {
    from: "/",
    to: "/main",
  },
];

export default routes;
